<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

// 登陆接口
Route::get('/login/', 'Login@index')->middleware('format');


// 登陆接口
Route::get('/login/test/', 'Login@test')->middleware('format');

// 咨询师列表
Route::get('/counselor/list/', 'Counselor@lists')->middleware('format');

// 咨询师列表
Route::get('/counselor/detail/', function(){
    return json_encode(array(
        'code' => 200,
        'msg' => '',
        'rst' => array(
            'id' => 1,
            'title_level' => '二级心理咨询师',
            'education' => '博士',
            'graduation_school' => '北京大学',
            'direciton_tag' => array('婚恋', '抑郁'),
            'introduction' => '',
            'org_name' => '聆听工作室'
        )
    ));
});
// 注册接口
Route::get('/register/', function () {
    return array('username' =>$_GET['username'], 'passwod' => $_GET['password']);
});

//文件上传

// 上传图片接口
Route::get('/qiniu/token', 'Qiniu@token')->middleware('format');

// 七牛test
Route::get('/qiniu/test', 'Qiniu@test');